import { IsNotEmpty, MinLength, MaxLength, IsString } from 'class-validator'
import { ApiProperty } from '@nestjs/swagger'
export class LoginStaffDto {
  @ApiProperty({ example: '13708171317', description: '手机号' })
  @IsNotEmpty({ message: '手机号不能为空' })
  phone: string

  @ApiProperty({ example: '123456', description: '密码' })
  @IsNotEmpty({ message: '密码不能为空' })
  @MinLength(6, {
    message: '密码长度不能小于6位'
  })
  @MaxLength(20, {
    message: '密码长度不能超过20位'
  })
  password: string

  @ApiProperty({ description: '验证码' })
  @IsNotEmpty({ message: '验证码不能为空' })
  code: string
}
